package com.ruoyi.init;

import com.ruoyi.business.service.wecom.WecomDataDellService;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;


@Component
@Slf4j
public class DataInitializer implements CommandLineRunner {


    @Resource
    private WecomDataDellService wecomDataDellService;


    /**
     * 项目启动完成后 同步企微群组 与群成员信息
     *
     * @param args
     */
    @Override
    public void run(String... args) throws WxErrorException {
        // 同步企业微信数据
        wecomDataDellService.dellWecomData();

    }
}
